<template>
  <view @click='sonclick' class="search" :style="{backgroundColor:bgc}">
    <view class="conster" :style="{borderRadius:`${radius}px`}">
      <uni-icons class="my-icon" type="search" size="18"></uni-icons>
      搜索
    </view>
  </view>
</template>

<script>
  export default {
    name: "my-search",
    props: {
      radius: {
        type: Number,
        default: 20
      },
      bgc: {
        type: String,
        default: '#c00000'
      }
    },
    data() {
      return {

      };
    },
    methods: {
      sonclick() {
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss">
  .search {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 999;
    // background-color: #c00000;
    padding: 20rpx;
    .conster {
      margin: 0 auto;
      background-color: #fff;
      height: 60rpx;
      // border-radius: 60rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      .my-icon {
        margin-right: 10rpx;
      }
    }
  }
</style>
